<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>订单支付</title>
<c:import url="/ctrl/header"></c:import>
<link href="/styles/datepicker.css" rel="stylesheet" />
</head>
<body>
  <c:import url="/ctrl/top"></c:import>
  <div class="container">
    <div class="row-fluid">
      <c:import url="/ctrl/menu" />
      <!--/span-->
      <div class="span10">
        <h3 class="greybg">
          订单号：
          <c:out value="${order.orderNo}" />
        </h3>
        <table
          class="table table-bordered table-striped responsive-utilities">
          <thead>
            <tr>
              <th>应付金额：<span class="red bold"
                style="font-size: 18px;"><fmt:formatNumber
                    var="settleprice" type="currency" pattern="￥.00"
                    value="${order.orderRealAmount}" /> <c:out
                    value="${settleprice}" /></span>
              </th>
            </tr>
          </thead>
          <tbody>
            <c:if test="${usefulFee>=order.orderRealAmount}">
              <tr>
                <th>余额支付</th>
              </tr>
              <tr>
                <td>
                  <form id="Form1" name="formPay" action="/pay/balance"
                    method="post">
                    实际付款金额：<span class="red bold"
                      style="font-size: 16px;"><c:out
                        value="${settleprice}" /></span>&nbsp;&nbsp;&nbsp;<input
                      name="orderId" type="hidden"
                      value="<c:out
                        value="${order.orderId}" />" /><input
                      name="orderType"
                      value="<c:out value="${orderType}"/>"
                      type="hidden" />&nbsp;&nbsp;您的可用余额：¥${usefulFee}&nbsp;&nbsp;<input
                      type="submit" id="balanceSubmit" name="button"
                      class="button btn-big btn-orange" value="余额支付" />
                  </form>
                </td>
              </tr>
            </c:if>
            <tr>
              <th>支付宝</th>
            </tr>
            <tr>
              <td>
                <form name="formAliPay" action="/pay/alipay/redirect"
                  target="_blank" method="post">
                  实际付款金额：<span class="red bold" style="font-size: 16px;"><fmt:formatNumber
                      var="needPayFee" type="currency" pattern="￥.00"
                      value="${payFee}" /> <c:out value="${needPayFee}" /></span>&nbsp;&nbsp;&nbsp;<input
                    name="orderId" type="hidden"
                    value="<c:out
                        value="${order.orderId}" />" />
                  <input name="orderType"
                    value="<c:out value="${orderType}"/>" type="hidden" /><input
                    type="submit" id="alipaySubmit" name="button"
                    class="button btn-big btn-orange" value="前往支付宝付款" />
                </form>
              </td>
            </tr>
          </tbody>
        </table>

      </div>
    </div>
    <hr />
    <c:import url="/ctrl/bottom"></c:import>
  </div>

  <c:import url="/ctrl/footer"></c:import>
  <script src="/scripts/bootstrap-datepicker.js"></script>
</body>
</html>